import { Inject, Provide } from '@midwayjs/decorator';
import { RedisService } from '@midwayjs/redis';


/**
 * 描述
 */
@Provide()
export class Redis2Service {


    @Inject()
    redisService: RedisService;
    /**
     * 描述
     */
    async setreids() {
        //  插入数据
        // await this.redisService.set("access_token", "69_wgiNPH9TiMOQOO9MtlQ2Tk55NpAofou6SYMSUwqBl_oD2lMLlHdSZJkAHIPfFMzBjVdwfQ2NWir_Ae3On-rAHrAiekf-rFvSv2ZSYCVEQIojlVCXFLj-mdLRx_YKMHeABABDY", "EX", "7200")
        return {
            code: "20000"
        }

    }
    async getreids() {
        //  插入数据
        let result = await this.redisService.get("md")
        console.log(result);

        return {
            code: result
        }

    }
}
